/**
 *
 */
package com.yangtao.framework.hibernate;

import com.yangtao.framework.common.SystemConstant;

import javax.persistence.Column;
import javax.persistence.MappedSuperclass;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import java.util.Date;

/**
 * 表单的基础映射类<br>
 * 包含了，表单的所属公司，创建时间，创建人，修改人，修改时间等
 *
 * @author 杨涛
 * @version 1.0
 */
@SuppressWarnings("serial")
@MappedSuperclass
public abstract class BaseBizEntity extends BaseEntity {
	/**
	 * 公司ID
	 */
	@Column(name = "company_id", length = 20)
	protected String companyId;

	/**
	 * 创建者
	 */
	@Column(name = "create_man", length = 20)
	protected String createMan;

	/**
	 * 创建时间
	 */
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "create_time")
	protected Date createTime;

	/**
	 * 修改者
	 */
	@Column(name = "update_man", length = 20)
	protected String updateMan;

	/**
	 * 更新时间
	 */
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "update_time")
	protected Date updateTime;

	/**
	 * 删除者
	 */
	@Column(name = "delete_man",length = 20)
	protected String deleteMan;

	/**
	 * 删除时间
	 */
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "delete_time")
	protected Date deleteTime;

	/**
	 * 数据状态<br>
	 * 0 无效<br>
	 * 1 有效<br>
	 * 2 过期<br>
	 * 默认为有效
	 */
	@Column(length = 2)
	protected Integer state = SystemConstant.STATE_VALID;

	public String getCompanyId() {
		return companyId;
	}

	public void setCompanyId(String companyId) {
		this.companyId = companyId;
	}

	public String getCreateMan() {
		return createMan;
	}

	public void setCreateMan(String createMan) {
		this.createMan = createMan;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public String getUpdateMan() {
		return updateMan;
	}

	public void setUpdateMan(String updateMan) {
		this.updateMan = updateMan;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public String getDeleteMan() {
		return deleteMan;
	}

	public void setDeleteMan(String deleteMan) {
		this.deleteMan = deleteMan;
	}

	public Date getDeleteTime() {
		return deleteTime;
	}

	public void setDeleteTime(Date deleteTime) {
		this.deleteTime = deleteTime;
	}

	public Integer getState() {
		return state;
	}

	public void setState(Integer state) {
		this.state = state;
	}
}
